<template>
  <div class="page">
    <el-card class="card">
      <el-row class="card-content">
        <!--    标签页-->
        <el-col :span="24" class="search-wrapper">
          <el-tabs v-model="activeName" @tab-click="handleClick">
            <!--我的资料-->
            <el-tab-pane label="我的资料" name="first">
              <user-info v-if="userInfo.id" :user-info="userInfo"></user-info>
            </el-tab-pane>
            <!--实名认证-->
            <el-tab-pane label="实名认证" name="second">
              <div class="real-name">
                <real-name v-if="userInfo.id" :user-info="userInfo"></real-name>
              </div>
            </el-tab-pane>
            <!--会员信息-->
            <el-tab-pane label="会员信息" name="third">
              <div class="member-info">
                <member-info v-if="userInfo.id" :user-info="userInfo"></member-info>
              </div>
            </el-tab-pane>
            <!--账号与安全-->
            <el-tab-pane label="账号与安全" name="fourth">
              <login-way v-if="userInfo.id" :user-info="userInfo"></login-way>
            </el-tab-pane>
          </el-tabs>
        </el-col>
      </el-row>
    </el-card>
  </div>
</template>

<script>
import UserInfo from '@/framework/components/user/userInfo/user-info'
import RealName from '@/framework/components/user/realName/real-name'
import LoginWay from '@/framework/components/user/loginWay/login-way'
import MemberInfo from '@/framework/components/user/memberInfo/member-info'
import { findWithMe } from '@/project/service/manager'

export default {
  name: "info",
  data(){
    return{
      activeName: 'first',//默认展示的标签页
      page:1,
      pageSize:0,
      total:0,
      userInfo: {},
      show:true,
    }
  },
  components: { UserInfo, RealName, LoginWay, MemberInfo },
  created(){
    this.findWithMe()
  },
  methods:{
    //获取本人信息
    findWithMe() {
      findWithMe({},data => {
        console.log("data:")
        console.log(data)
        this.userInfo = data
      })
    },
    //切换标签时触发
    handleClick(){

    }
  },
}
</script>

<style lang="less" scoped>
</style>
